package com.educate.device.model;

import com.educate.common.utils.gen.GenUtils;
import freemarker.template.TemplateException;

import java.io.IOException;

public class Generator {


    private static final String packageName = "com.educate.member";
    private static final boolean skipExist = true;
    private static final String apiDir =    "educate-member/educate-member-web";
    private static final String rpcDir =    "educate-member/educate-member-rpc-api";
    private static final String bizDir =    "educate-member/educate-member-rpc-service";
    private static final String daoDir =    "educate-member/educate-member-dao";
    private static final String modelDir =  "educate-member/educate-member-model";

    public static void main(String[] args) throws IOException, TemplateException {
//        final String[] tfls = {"dao.ftl", "daoImpl.ftl", "bo.ftl", "service.ftl", "serviceImpl.ftl", "api.ftl"};
        final String[] tfls = {"api.ftl"};
        String[] modelName = GenUtils.getModelNames("educate-member\\educate-member-model\\src\\main\\java\\com\\educate\\member\\model\\po");
//        final String[] modelName = {"Member"};
        GenUtils.generate(tfls, modelName, skipExist, packageName, apiDir, rpcDir, bizDir, modelDir, daoDir);
    }
}
